This extension allows removing the version of an Item which was created last. The Undo Edit button appears on the toolbar when a new version of an Item is created.
With this button users can delete newly created Items or remove workflow Item versions created by pressing the Edit button on the toolbar.
1. Installation
The File Xsl Extension is distributed as a standard Sitecore package. Thus to start using it, you should install the package. Please refer to the Installing Modules and Packages article if you are not familiar with the standard Sitecore Packager tool.
The package adds UndoEdit.dll to the bin folder of your site and the Undo Edit command to /sitecore/content/system/commands.
Setting up a new command:
- Enter the Sitecore Client. Switch to Core database.
- Switch to the System area and navigate to the /sitecore/content/system/shell/__default/commands item using the Content Editor.
- In the Commands multilist field of the Data section, move the Undo Edit command to the selected section.
2. User Manual
The Undo Edit button appears on the toolbar when a new version of an Item is created. The button remains in place until the Item is checked-in or moved to another workflow step.
The command behaves in the following way:
- If the Undo Edit button is invoked by item creation (thus there is just one version available), the command deletes the item.
- If the Undo Edit button is invoked by version creation, the command deletes the last item version.
For instance, a new version is created when the Editor User selects an Item in the done state and clicks the Edit button.
Example 1:
- Log in as an Editor User.
- Create an item.
- Select the newly created item.
- Click the Undo Edit button on the toolbar.
- You will see the delete item confirmation dialog.
- Confirm your choice (the item will be deleted).
Example 2:
- Create an Item with workflow.
- Log in as a User with administrator privileges. Move the item through all workflow steps.
- Log in as a non-administrator user.
- Navigate to the Item and click the Edit toolbar button. A new version will be created for editing.
- Click the Undo Edit button on the toolbar.
- You will see the delete item version confirmation dialog. Confirm your choice (the last item version will be deleted).